<?php

require_once "core/application/controllers/MainController.php";

/**
 *  Проверяет пользователя, вошел он или нет
 * @author PeoneEr
 */
class Check extends Main_Controller {

    private static $_instance = NULL;

    public static function getInstance() {
        if (is_null(self::$_instance)) {
            $class = __CLASS__;
            self::$_instance = new $class();
        }
        return self::$_instance;
    }

    public function __construct() {
        if (!isset($_SESSION['name']) or !isset($_SESSION['id'])) {
            $this->error404();
        }
    }

}

?>